<div class="container"> 
<!-- middle -->
<div id="middle" class="cols2">
	
    <div class="title">
    	<h1><?=$post['training_title']?></h1>
        <div class="post-meta">
	    	<span class="tags">
				<a href="#"><?=$post['day'].' '.$post['month'].' '.$post['year']?></a>
				<a href="#"><?=$post['user_name']?></a>
			</span> 
				<?php if(is_superUser()):?>
				<a href="#" class="author"><?=anchor('/','Update')?></a> <span class="separator">|</span>
				<a href="#" class="author"><?=anchor('/','Remove')?></a> <span class="separator">|</span>
				<?php endif;?>
			    <!--<a href="#comments" class="anchor">256 Comments</a> <span class="separator">|</span> in <a href="posts-list.html">Technology</a>-->
	    </div>
    </div>  
    
    <div class="content" role="main">
       
    	<article class="post-detail">            
			<div class="entry">
				<?=$post['training_content']?>		
            <div class="clear"></div>            
            </div>
            
            	<!-- author description -->
				<?php foreach($files as $file):?>
                <div class="author-box">
                    <div class="author-description">
                		<div class="author-image"><img src="<?=base_url('assets/images/icons/pdf.png')?>" alt=""><span class="author">PDF File</span></div>
                      	<div class="author-text">
                            <p><span style="font-size:14px;font-weight:bold"><?=$file['file_title']?></span> <br/><?=$file['file_content']?></p>
							<p><a href="<?=base_url('assets/files/').'/'.$file['file_name']?>">Download File</a>  |
							<?=anchor('training/removeFile/'.$file['file_id'],'Remove File');?></p>
                        </div>
                        <div class="clear"></div>
                	</div>        
                </div>
				<?php endforeach;?>
                <!--/ author description -->
				
				<!-- form Upload -->
				<?php if(is_superUser()):?>
                <div class="author-box">
					<h3 style="margin:10px 10px">Upload File</h3>
                    <div class="author-description">
					    <?=form_open_multipart('training/saveFile')?>
						<?=form_hidden('id',$post['training_id'])?>
                		<p style="margin-bottom:10px"><span style="width:100px">Title</span> <?=form_input('title','','style="padding:2px;width:400px"')?></p>
						<p style="margin-bottom:10px"><span style="width:100px">File&nbsp;&nbsp; </span> <?=form_upload('file','','style="padding:2px;width:400px"')?></p>
						<p style="margin-bottom:10px"><span style="width:100px">Desc</span> <?=form_input('content','','style="padding:2px;width:400px"')?></p>
                        <p style="margin-bottom:10px;text-align:center"><input type="submit" value="Upload File" /></p>
						<?=form_close()?>
						<div class="clear"></div>
                	</div>        
                </div>
				<?php endif;?>
                <!--/ form upload -->
                
        </article>
					
						
				
					
                
        
	</div>
    <!--/ content -->
    
    <!-- sidebar -->
    <div class="sidebar">

		<div class="widget-container widget_nav_menu">
        	<img src="images/icons/icons_16_menu.png" alt="" class="widget_icon">
           		<h3 class="widget-title">TRAINING CATEGORIES</h3>
                    <ul>
                        <?php foreach($categories as $row):?>                       		
                            <li>
							<a <?php if($cat_link==$row['category_id']) echo 'class="active"'?> href="<?=site_url('training/index/'.$row['category_id'].'/'.seoUrl($row['category_name']))?>"><span><?=$row['category_name']?></span></a>
							<a onclick="return confirm('Are You Sure Want to remove !')" href="<?=site_url('training/removeCategory/'.$row['category_id'])?>"><img src="<?=base_url('assets/images/icons/delete.gif')?>" style="width:16px;height:16px" /></a>
							</li> 
                        <?php endforeach;?>
						<?php if(is_superUser()):?>	
							<li><a href="<?=site_url('training/add_category')?>"><span><?='Add New Category'?></span></a></li>
						<?php endif;?>
                        <?php //$categories->free_result(); ?>    
                            
                    </ul>
		</div>
                    
    </div>
    <!--/ sidebar -->
    
    <div class="divider"></div>
    
    
        	
</div>
<!--/ middle --> 
</div>
<!--/ container --> 